package com.diandian.common;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;

/**
 * @description BaseZuulFilter
 * @author TDW
 * @date 2016年12月29日
 *
 */
public class BaseZuulFilter extends ZuulFilter {
	//public static final Logger log = Logger.getLogger(BaseZuulFilter.class);
	private static final Logger logger = LogManager.getLogger(BaseZuulFilter.class.getName());
	public Object run() {
		String requestUri = RequestContext.getCurrentContext().getRequest().getRequestURI();
		logger.info("BaseZuulFilter filter request uri:"+requestUri);
		
		return null;
	}

	public boolean shouldFilter() {//不使用
		return false;
	}

	@Override
	public int filterOrder() {
		return 0;
	}

	@Override
	public String filterType() {
		return "pre";
	}

}
